<?php
// +-------------------------------------------------------------------
// |
// +-------------------------------------------------------------------
// | Copyright (c) 2009-2016 All rights reserved.
// +-------------------------------------------------------------------
namespace Service\Api\V1;

use Think\Model;

class GetWeixinPayInfo
{
    public $login = false; //是否需要登录才能访问该接口
    public $title = "微信支付接口";
    public $group = '订单';
    public $desc = "";

    public $input = [
        'order_no' => 'required;label=订单号;',
    ];

    public $output = [
        [
            'appId' => 'label=appId;',
            'nonceStr' => 'label=随机字符串;',
            'prepayId' => 'label=prepayId;',
            'package' => 'label=package;',
            'signType' => 'label=加密类型;',
            'timeStamp' => 'label=时间戳;',
            'sign' => 'label=签名;',
        ]
    ];

    public function run($param, $uid)
    {

        $param['pay_type'] = 3;
        $result = OE('order')->appPay($param, $uid);
//        var_dump($result);exit();
        return $result;
    }
}
